//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.itheima.pinda.authority.dto.auth;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import javax.validation.constraints.NotEmpty;
import org.hibernate.validator.constraints.Length;

@ApiModel(
        value = "ResourceSaveDTO",
        description = "资源"
)
public class ResourceSaveDTO implements Serializable {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty("资源编码")
    @Length(
            max = 255,
            message = "资源编码长度不能超过255"
    )
    private String code;
    @ApiModelProperty("接口名称")
    @NotEmpty(
            message = "接口名称不能为空"
    )
    @Length(
            max = 255,
            message = "接口名称长度不能超过255"
    )
    private String name;
    @ApiModelProperty("菜单ID")
    private Long menuId;
    @ApiModelProperty("接口描述")
    @Length(
            max = 255,
            message = "接口描述长度不能超过255"
    )
    private String describe;

    public static ResourceSaveDTO.ResourceSaveDTOBuilder builder() {
        return new ResourceSaveDTO.ResourceSaveDTOBuilder();
    }

    public String getCode() {
        return this.code;
    }

    public String getName() {
        return this.name;
    }

    public Long getMenuId() {
        return this.menuId;
    }

    public String getDescribe() {
        return this.describe;
    }

    public ResourceSaveDTO setCode(final String code) {
        this.code = code;
        return this;
    }

    public ResourceSaveDTO setName(final String name) {
        this.name = name;
        return this;
    }

    public ResourceSaveDTO setMenuId(final Long menuId) {
        this.menuId = menuId;
        return this;
    }

    public ResourceSaveDTO setDescribe(final String describe) {
        this.describe = describe;
        return this;
    }

    public ResourceSaveDTO() {
    }

    public ResourceSaveDTO(final String code, final String name, final Long menuId, final String describe) {
        this.code = code;
        this.name = name;
        this.menuId = menuId;
        this.describe = describe;
    }

    public String toString() {
        return "ResourceSaveDTO(super=" + super.toString() + ", code=" + this.getCode() + ", name=" + this.getName() + ", menuId=" + this.getMenuId() + ", describe=" + this.getDescribe() + ")";
    }

    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof ResourceSaveDTO)) {
            return false;
        } else {
            ResourceSaveDTO other = (ResourceSaveDTO)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                label59: {
                    Object this$code = this.getCode();
                    Object other$code = other.getCode();
                    if (this$code == null) {
                        if (other$code == null) {
                            break label59;
                        }
                    } else if (this$code.equals(other$code)) {
                        break label59;
                    }

                    return false;
                }

                Object this$name = this.getName();
                Object other$name = other.getName();
                if (this$name == null) {
                    if (other$name != null) {
                        return false;
                    }
                } else if (!this$name.equals(other$name)) {
                    return false;
                }

                Object this$menuId = this.getMenuId();
                Object other$menuId = other.getMenuId();
                if (this$menuId == null) {
                    if (other$menuId != null) {
                        return false;
                    }
                } else if (!this$menuId.equals(other$menuId)) {
                    return false;
                }

                Object this$describe = this.getDescribe();
                Object other$describe = other.getDescribe();
                if (this$describe == null) {
                    if (other$describe != null) {
                        return false;
                    }
                } else if (!this$describe.equals(other$describe)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof ResourceSaveDTO;
    }

    public int hashCode() {
        boolean PRIME = true;
        int result = 1;
        Object $code = this.getCode();
        result = result * 59 + ($code == null ? 43 : $code.hashCode());
        Object $name = this.getName();
        result = result * 59 + ($name == null ? 43 : $name.hashCode());
        Object $menuId = this.getMenuId();
        result = result * 59 + ($menuId == null ? 43 : $menuId.hashCode());
        Object $describe = this.getDescribe();
        result = result * 59 + ($describe == null ? 43 : $describe.hashCode());
        return result;
    }

    public static class ResourceSaveDTOBuilder {
        private String code;
        private String name;
        private Long menuId;
        private String describe;

        ResourceSaveDTOBuilder() {
        }

        public ResourceSaveDTO.ResourceSaveDTOBuilder code(final String code) {
            this.code = code;
            return this;
        }

        public ResourceSaveDTO.ResourceSaveDTOBuilder name(final String name) {
            this.name = name;
            return this;
        }

        public ResourceSaveDTO.ResourceSaveDTOBuilder menuId(final Long menuId) {
            this.menuId = menuId;
            return this;
        }

        public ResourceSaveDTO.ResourceSaveDTOBuilder describe(final String describe) {
            this.describe = describe;
            return this;
        }

        public ResourceSaveDTO build() {
            return new ResourceSaveDTO(this.code, this.name, this.menuId, this.describe);
        }

        public String toString() {
            return "ResourceSaveDTO.ResourceSaveDTOBuilder(code=" + this.code + ", name=" + this.name + ", menuId=" + this.menuId + ", describe=" + this.describe + ")";
        }
    }
}
